package com.Logistics.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Node {
    private  Core_org data;
    private List<Node> children;

    public Node(Core_org data) {
        this.data = data;
        this.children = new ArrayList<>();
    }

    public Core_org getData() {
        return data;
    }

    public List<Node> getChildren() {
        return children;
    }

    public void addChild(Node child) {
        children.add(child);
    }
}

